/*
 * 
 */

package main;


import org.json.*;
import java.io.*;
import java.util.ArrayList;
import piticli.twitter.*;
/**
 *
 * @author Rene
 */
public class Main {


    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) throws JSONException {
        // TODO code application logic here
        

    /*Este bloque de código solo sirve para hacer una conexión y
     * obtener el home timeline. A manera de probar el engine
     */
        TwitterConnection conn = new TwitterConnection("","");
        
               
        ArrayList tweets = conn.getHomeTimeline(20);
        if(tweets == null) return;
        
        for(int i=0;i<tweets.size();i++)
        {
            Tweet tweet = (Tweet) tweets.get(i);
            System.out.println(tweet.getText());
            System.out.println("via " + tweet.getSource());
            System.out.println(tweet.getUser().getScreen_name());
            System.out.println(tweet.getUser().getName());
            System.out.println(tweet.getUser().getProfile_image_url());
            System.out.println("Tweets: " + tweet.getUser().getStatuses_count());
            System.out.println(tweet.getUser().getCreated_at());
            System.out.println("=========================");
            
    //        System.out.println("Escrito: " + tweet.getUser().getCreated_at().getDate()+
    //                "/"+ tweet.getUser().getCreated_at().getMonth()+
    //                "/"+ tweet.getUser().getCreated_at().getYear()
    //                );
        }
        //System.out.print(response);
    }

   
}
